package jvm_argument;

import java.util.ArrayList;
import java.util.List;

public class Demo3 {

    public static void main(String[] args) {
        //-Xms1m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
        List<Object> list = new ArrayList<>();
        for(int i = 0 ; i < 10 ; i++){
            System.out.println("i:" + i);
            byte[] bytes = new byte[1*1024*1024];
            list.add(bytes);
        }
        System.out.println("添加成功...");
    }
}
